package com.wxh.bomb.netty.myrpc.service;

import com.wxh.bomb.netty.myrpc.annotation.Service;
import com.wxh.bomb.netty.myrpc.api.LoginService;
import com.wxh.bomb.netty.myrpc.bean.LoginInfo;
import com.wxh.bomb.netty.myrpc.bean.User;

import java.util.Date;

/**
 * @author wxh
 */
@Service
public class LoginServiceImpl implements LoginService {

    @Override
    public LoginInfo login(String userCode, String passwd) {
        User user = new User();
        user.setUserCode(userCode);
        user.setUserName("王星火");
        user.setAge("20");
        user.setAddress("湖北省武汉市");

        LoginInfo loginInfo = new LoginInfo();
        loginInfo.setUser(user);
        loginInfo.setLoginIp("1.1.1.1");
        loginInfo.setLoginTime(new Date());
        loginInfo.setTimes(10);

        return loginInfo;
    }
}
